class Dog {
  constructor(name: string) {
    this.name = name;
  }
  name: string; // 实例属性 可进行初始化、可设置为可选属性name?: string
  run() {}
  private pri() {}
  protected pro() {}
  readonly legs: number = 4;
  static food: string = "bones";
}
console.log(Dog.prototype);
let dog = new Dog("wangwang");
console.log(dog);
// dog.pri();
// dog.pro();
console.log(Dog.food);
// 类的继承
class Husky extends Dog {
  constructor(name: string, public color: string) {
    super(name);
    this.color = color;
    // this.pri();
    this.pro();
  }
  //   color: string;
}
console.log(Husky.food);
